// +----------------------------------------------------------------------
// | SparkShop 坚持做优秀的商城系统
// +----------------------------------------------------------------------
// | Copyright (c) 2022~2099 http://sparkshop.cn All rights reserved.
// +----------------------------------------------------------------------
// | Licensed ( https://opensource.org/licenses/mit-license.php )
// +----------------------------------------------------------------------
// | Author: NickBai
// +----------------------------------------------------------------------

import request from "@/utils/request.js";

export default {
	// 获取积分商城首页
	home: {
		get: async function(data = {}) {
			return await request.get('addons/integral/api.index/index', data);
		}
	},
	// 积分商品详情
	goods: {
		get: async function(data = {}) {
			return await request.get('addons/integral/api.index/goods', data);
		}
	},
	// 获取订单信息
	getOrderInfo: {
		post: async function(data = {}) {
			return await request.post('addons/integral/api.order/info', data);
		}
	},
	// 创建订单
	createOrder: {
		post: async function(data = {}) {
			return await request.post('addons/integral/api.order/createOrder', data);
		}
	},
	// 获取订单记录
	log: {
		get: async function(data = {}) {
			return await request.get('addons/integral/api.order/log', data);
		}
	},
	// 订单详情
	detail: {
		get: async function(data = {}) {
			return await request.get('addons/integral/api.order/detail', data);
		}
	},
	// 物流详情
	express: {
		get: async function(data = {}) {
			return await request.get('addons/integral/api.order/express', data);
		}
	},
	// 确认收货
	received: {
		get: async function(data = {}) {
			return await request.get('addons/integral/api.order/received', data);
		}
	}
}